/**
 * url: 页面的 URL
 * code: 页面的唯一标识,用来获取页面的国际化信息.或者拿来做权限判断
 * Created by zhangsong on 2019-01-21.
 */
import Power from '@/constants/power';

export const Login = {
  url: '/user/login',
  code: 'pageLogin',
};

export const Welcome = {
  url: '/welcome',
  code: 'pageWelcome',
};

export const StaffApplication = {
  code: 'menuStaff',
  // 因为 antd pro 菜单的关系,必须要有该属性,才会正确展示菜单
  url: '/application/staff/list',
  authority: 'admin',
  add: {
    url: '/application/staff/add',
    code: 'pageStaffAdd',
    authority: Power.StaffApplication.add,
  },
  list: {
    url: '/application/staff/list',
    code: 'pageStaffList',
    authority: Power.StaffApplication.list,
  },
  modify: {
    url: '/application/staff/modify',
    code: 'pageStaffModify',
    authority: Power.StaffApplication.modify,
  },
  detail: {
    url: '/application/staff/detail',
    code: 'pageStaffDetail',
    authority: Power.StaffApplication.detail,
  },
};

export const ContractorApplication = {
  code: 'menuContractor',
  url: '/application/contractor/list',
  add: {
    url: '/application/contractor/add',
    code: 'pageContractorAdd',
    authority: Power.ContractorApplication.add,
  },
  list: {
    url: '/application/contractor/list',
    code: 'pageContractorList',
    authority: Power.ContractorApplication.list,
  },
  modify: {
    url: '/application/contractor/modify',
    code: 'pageContractorModify',
    authority: Power.ContractorApplication.modify,
  },
  detail: {
    url: '/application/contractor/detail',
    code: 'pageContractorDetail',
    authority: Power.ContractorApplication.detail,
  },
};

export const VehicleApplication = {
  code: 'menuVehicles',
  url: '/application/vehicles/list',
  add: {
    url: '/application/vehicles/add',
    code: 'pageVehiclesAdd',
    authority: Power.VehiclesApplication.add,
  },
  list: {
    url: '/application/vehicles/list',
    code: 'pageVehiclesList',
    authority: Power.VehiclesApplication.list,
  },
  modify: {
    url: '/application/vehicles/modify',
    code: 'pageVehiclesModify',
    authority: Power.VehiclesApplication.modify,
  },
  detail: {
    url: '/application/vehicles/detail',
    code: 'pageVehiclesDetail',
    authority: Power.VehiclesApplication.detail,
  },
};
export const TemporaryApplication = {
  code: 'menuTemporary',
  url: '/application/temporarypass/list',
  add: {
    url: '/application/temporarypass/add',
    code: 'pageContractorAdd',
    authority: Power.TemporaryApplication.add,
  },
  list: {
    url: '/application/temporarypass/list',
    code: 'pageContractorList',
    authority: Power.TemporaryApplication.list,
  },
  modify: {
    url: '/application/temporarypass/modify',
    code: 'pageContractorModify',
    authority: Power.TemporaryApplication.modify,
  },
  detail: {
    url: '/application/temporarypass/detail',
    code: 'pageContractorDetail',
    authority: Power.TemporaryApplication.detail,
  },
};

export const VaccineApplication = {
  code: 'steeingPage',
  url: '/application/vaccine/setting',
  add: {
    url: '/application/vaccine/setting',
    code: 'menuVaccine',
    authority: Power.VaccineApplication.setting,
  },
  time: {
    url: '/application/vaccine/partbtime',
    code: 'menuPartbTime',
    authority: Power.VaccineApplication.partbtime,
    // url: '/application/vaccine/partbtime',
    // code: 'menuPartbTime',
    // authority: Power.VaccineApplication.partbtime,
  },
};

export const AlarmEmailApplication = {
  code: 'alarmemailPage',
  url: '/application/alarmemail/list',
  add: {
    url: '/application/alarmemail/list',
    code: 'menuAlarmEmail',
    authority: Power.AlarmEmailApplication.list,
  },
};
